import Vue from 'vue'
import App from './App.vue'
import VueRouter from "vue-router"
import Category from "./views/Category.vue"
import My from "./views/My.vue"
import List from "./views/List.vue"
import Home from "./views/Home.vue"


const routes = [{
    path: "/category",
    component: Category
  },
  {
    path: "/my",
    component: My
  },
  {
    path: "/list",
    component: List
  },
  {
    path: "/home",
    component: Home
  }
]
// 创建路由对象 传入规则
const router = new VueRouter({
  routes
})
Vue.config.productionTip = false
Vue.use(VueRouter)
//在vue中 注册路由
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')